set_sound_master_volume

This function sets the master volume for the sound mixer.

bool set_sound_master_volume(double volume)

Parameters:
volume
The new value that is to be the master volume, between a maximum of 0 and a minimum of -100.

Return value:
true on success, false on failure.

Remarks:
The master volume works similar to the master fader on a mixing desk. It controls every sound that is played during the game and works independently of a sound object's volume control. This means that you can continue treating the volume of individual sound objects exactly the same as before, where 0 is always the maximum based on the current master volume. This can be useful if your game uses quiet TTS output and has a rather loud or busy soundscape.

Please note that these functions do not apply to the Windows volume control, only sounds that are played from within the game itself.

Example:
// Set the master volume to -30 and retrieve the new value.

void main()
{
set_sound_master_volume(-30);
alert("Sound master volume", "The sound master volume is " + get_sound_master_volume() + ".");
}